let {Menu,BrowserWindow}=require('electron');
let template=[
    {
        label:'加载网页',
        submenu:[
            {
                label:'优酷',
                click(){
                    let win=BrowserWindow.getFocusedWindow();//获取当前窗口
                    win.webContents.send('openWebview',"https://www.youku.com")
                }
            },
            {
                type:'separator'
            }
        ]
    }
]
let m=Menu.buildFromTemplate(template)
Menu.setApplicationMenu(m) 


